package com.sicau.socialpracticesystem.entity.param.teammember;

import com.sicau.socialpracticesystem.common.myenum.TeamMemberStateEnum;
import com.sicau.socialpracticesystem.entity.param.PageParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author sxt
 * @version 1.0
 * @description 团队申请查询参数
 * @date 2021/5/4 3:46 下午
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "团队申请查询参数", description = "团队申请查询参数")
public class TeamApplyQueryParam extends PageParam {
    @ApiModelProperty("团队申请状态")
    private Integer state = TeamMemberStateEnum.HAS_APPLIED.getState();

    public Integer getState() {
        TeamMemberStateEnum memberStateEnum = TeamMemberStateEnum.getEnum(state);
        return memberStateEnum != null ? memberStateEnum.getState() : null;
    }
}
